package com.zhuiyun.pm.client.sc.mapper;

import com.zhuiyun.pm.client.sc.entity.ClientTable;
import com.zhuiyun.pm.client.sc.entity.Intermediate;
import com.zhuiyun.pm.config.BaseMapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TableMapper extends BaseMapper<Intermediate> {


     @Select("<script>select bb.* from client_Intermediate_table aa\n" +
             "left join client_goods_info bb\n" +
             "on aa.good_id=bb.id" +
             " where aa.user_id = #{userId}</script>")
     @Results({
             @Result(property = "userId" , column = "user_id"),
             @Result(property = "goodId" , column = "good_id"),
             @Result(property = "goodsName" , column = "goods_name"),
             @Result(property = "goodsNumber" , column = "goods_number"),
             @Result(property = "startPrice" , column = "start_price"),
             @Result(property = "startPrice" , column = "start_price"),
             @Result(property = "transactionAddress" , column = "transaction_address"),
             @Result(property = "weight" , column = "weight"),
             @Result(property = "number" , column = "number"),
             @Result(property = "transactionType" , column = "transaction_type"),
             @Result(property = "earnestMoney" , column = "earnest_money"),
             @Result(property = "imgId" , column = "img_id"),
             @Result(property = "transactionStatus" , column = "transaction_status"),
             @Result(property = "startTime" , column = "start_time"),
             @Result(property = "endTime" , column = "end_time"),
             @Result(property = "delayMinutes" , column = "delay_minutes"),
             @Result(property = "sellerId" , column = "seller_id"),
             @Result(property = "checkStatus" , column = "check_status"),
             @Result(property = "createTime" , column = "create_time"),
             @Result(property = "updateTime" , column = "update_time"),
             @Result(property = "back" , column = "back"),
             @Result(property = "phone" , column = "phone"),
             @Result(property = "contactName" , column = "contact_name"),
             @Result(property = "imgViewId" , column = "imgView_id"),

     })
List<ClientTable>TableList(Integer userId);

}
